/* -------------------------------
   RESET DE BASE (AMÉLIORÉ)
-------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    line-height: 1.6;
    background: #242943;
    color: #333;
    overflow-x: hidden; /* Empêche le débordement horizontal */
}

/* -------------------------------
   HEADER (RESPONSIVE)
-------------------------------- */
header {
    width: 100%;
}

.header-text {
    text-align: center;
    color: white;
    padding: clamp(2rem, 8vw, 4rem) 1rem; /* Padding responsive */
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.header-text h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}

.header-text p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-style: italic;
}

/* -------------------------------
   NAVIGATION PRINCIPALE (RESPONSIVE)
-------------------------------- */
.main-nav {
    position: sticky;
    top: 0;
    background: #09255a;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0.8rem 1rem; /* Padding ajouté sur les côtés */
    gap: clamp(0.5rem, 2vw, 2rem); /* Gap responsive */
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem clamp(0.5rem, 2vw, 1rem); /* Padding responsive */
    transition: 0.3s;
    position: relative;
    font-size: clamp(0.9rem, 2vw, 1rem); /* Taille de police responsive */
    white-space: nowrap; /* Empêche la coupure du texte */
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -4px;
    background-color: #ffcc00;
    transition: width 0.3s;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a.active {
    color: #ffcc00;
}

/* -------------------------------
   NAVIGATION SECONDAIRE (RESPONSIVE)
-------------------------------- */
.sub-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    margin-top: 1rem;
    padding: 0 1rem;
    flex-wrap: wrap; /* Retour à la ligne sur mobile */
}

.sub-nav ul li a {
    text-decoration: none;
    color: white;
    background: #1e3c72;
    padding: 0.5rem clamp(0.8rem, 2vw, 1.2rem);
    border-radius: 8px;
    transition: 0.3s;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    display: inline-block;
    text-align: center;
}

.sub-nav ul li a:hover,
.sub-nav ul li a.active {
    background: #ffcc00;
    color: #1e3c72;
}

/* -------------------------------
   SECTIONS (RESPONSIVE)
-------------------------------- */
section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem); /* Padding responsive */
    max-width: min(900px, 95%); /* Largeur max avec marge */
    margin: auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Taille responsive */
    margin-bottom: 1rem;
    color: white;
    text-transform: uppercase;
    text-align: center; /* Centrer sur mobile */
}

section p, section ul {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7; /* Légèrement réduit pour mobile */
}

section ul {
    list-style: disc inside;
    text-align: left;
    max-width: 600px;
    margin: 1rem auto;
    padding-left: 1rem; /* Espace pour les puces */
}


#welcome h2 {
    color: white; /* Choisissez votre couleur ici, ex: un orange vif */
    text-align: center; /* Vous pouvez aussi centrer le titre */
    margin-bottom: 20px;
}
/* -------------------------------
   PROJETS (RESPONSIVE)
-------------------------------- */
.project {
    background: white;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    margin: clamp(1rem, 3vw, 2rem) auto;
    max-width: min(700px, 95%);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.project h2 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.project p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 1rem;
}

.project a {
    color: #1e3c72;
    font-weight: bold;
    text-decoration: none;
    word-break: break-word; /* Gestion des URLs longues */
}

.project a:hover {
    text-decoration: underline;
}

/* -------------------------------
   CONTACT (RESPONSIVE)
-------------------------------- */
/* CONTACT*/
#contact {
    /* Fond de la section */
    background-color: #242943; 
    padding: 30px;
    border-radius: 8px; /* Coins arrondis */
    margin-bottom: 30px;
    /* Couleur du texte général en blanc */
    color: white; 
}

#contact h2 {
    /* Couleur des titres H2 (Mes Écoles, Programme) */
    color: #007bff; /* Bleu professionnel comme couleur d'accentuation */
    border-bottom: 2px solid #007bff; /* Soulignement du titre */
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.contact-box {
    background:#242943;
    padding: clamp(1rem, 4vw, 2rem);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    max-width: min(600px, 95%);
    width: 100%;
    margin: clamp(1rem, 3vw, 2rem) auto;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 2rem);
}

.contact-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-box form input,
.contact-box form textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    width: 100%; /* S'assurer qu'ils prennent toute la largeur */
}

.contact-box form textarea {
    min-height: 120px; /* Hauteur minimale */
    resize: vertical; /* Redimensionnement vertical seulement */
}

.contact-box form button {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: 0.3s;
    width: 100%; /* Pleine largeur sur mobile */
    max-width: 200px; /* Largeur max sur desktop */
    margin: 0 auto; /* Centrer le bouton */
}

.contact-box form button:hover {
    background: #ffcc00;
    color: #1e3c72;
}

.contact-info {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.contact-info a {
    color: #1e3c72;
    font-weight: bold;
    text-decoration: none;
    word-break: break-word; /* Gestion des emails longs */
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-photo img {
    border-radius: 50%;
    width: clamp(100px, 25vw, 150px); /* Taille responsive */
    height: clamp(100px, 25vw, 150px);
    object-fit: cover;
    display: block;
    margin: 0 auto 20px;
    border: 3px solid #333;
}



#formation {
    /* Fond de la section */
    background-color: #242943; /* Gris foncé pour contraster avec un fond de page clair si nécessaire */
    padding: 30px;
    border-radius: 8px; /* Coins arrondis */
    margin-bottom: 30px;
    /* Couleur du texte général en blanc */
    color: white; 
}

#formation h2 {
    /* Couleur des titres H2 (Mes Écoles, Programme) */
    color: #007bff; /* Bleu professionnel comme couleur d'accentuation */
    border-bottom: 2px solid #007bff; /* Soulignement du titre */
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}
/* Formation */
#formation p, #formation ul {
    line-height: 1.8;
}

#formation ul {
    list-style-type: none; /* Supprime les puces par défaut */
    padding-left: 0;
}

#formation ul li {
    padding: 8px 0;
    /* Option : ajouter une icône personnalisée si vous souhaitez */
}

/* Style des années et des matières importantes */
#formation strong {
    color: #ffd700; /* Or/Jaune pour faire ressortir les éléments clés (années, titres de modules) */
    font-weight: 600;
}



/* -------------------------------
   FOOTER (RESPONSIVE)
-------------------------------- */
footer {
    background: #1e3c72;
    color: white;
    padding: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

footer a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* -------------------------------
   BOUTON SCROLL TOP (RESPONSIVE)
-------------------------------- */
#scrollTopBtn {
    position: fixed;
    bottom: clamp(20px, 5vw, 30px);
    right: clamp(20px, 5vw, 30px);
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.8rem, 2vw, 1rem);
    border: none;
    background: #1e3c72;
    color: white;
    border-radius: 50%;
    font-size: clamp(1rem, 3vw, 1.2rem);
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: 0.3s;
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
}

#scrollTopBtn:hover {
    background: #ffcc00;
    color: #1e3c72;
}

/* -------------------------------
   MEDIA QUERIES SPÉCIFIQUES
-------------------------------- */

/* Tablettes */
@media (max-width: 768px) {
    .main-nav ul {
        gap: 0.5rem;
    }
    
    .main-nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    section {
        padding: 2rem 1rem;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .main-nav ul {
        flex-direction: column; /* Menu vertical sur très petits écrans */
        align-items: center;
        gap: 0.5rem;
    }
    
    .sub-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .contact-box form button {
        max-width: 100%; /* Bouton pleine largeur sur mobile */
    }
    
    section ul {
        padding-left: 1.5rem; /* Plus d'espace pour les puces */
    }
}

/* Grands écrans */
@media (min-width: 1200px) {
    section {
        max-width: 1000px; /* Un peu plus large sur grands écrans */
    }
    
    .project {
        max-width: 800px;
    }
}